package com.yanqu.road.entity.union.cross;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

@FieldTypeAnnotation(tableName = "t_c_union_flag")
public class CrossUnionFlag extends DataObject {
    @FieldTypeAnnotation(select = true, update = true)
    private String unionUid;
    @FieldTypeAnnotation(update = true)
    private int flagId;
    /**
     * 过期时间 ms
     */
    @FieldTypeAnnotation
    private long expireTime;
    @FieldTypeAnnotation
    private boolean read;

    @FieldTypeAnnotation(desc = "类型：（0：完整；1：旗头；2：旗面；3：旗饰）")
    private int flagType;

    public String getUnionUid() {
        return unionUid;
    }

    public void setUnionUid(String unionUid) {
        this.unionUid = unionUid;
    }

    public int getFlagId() {
        return flagId;
    }

    public void setFlagId(int flagId) {
        this.flagId = flagId;
    }

    public long getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(long expireTime) {
        if (this.expireTime != expireTime) {
            this.expireTime = expireTime;
            setUpdateOption();
        }
    }

    public boolean isRead() {
        return read;
    }

    public void setRead(boolean read) {
        if (this.read != read) {
            this.read = read;
            setUpdateOption();
        }
    }

    public int getFlagType() {
        return flagType;
    }

    public void setFlagType(int flagType) {
        if(this.flagType != flagType) {
            this.flagType = flagType;
            setUpdateOption();
        }
    }
}
